#pragma once

#ifndef DECISION_H
#define DECISION_H

#include "DecisionTreeNode.h"
template<typename T>
class Decision : public DecisionTreeNode<T>
{
protected:
	DecisionTreeNode<T>* trueNode;
	DecisionTreeNode<T>* falseNode;
	virtual DecisionTreeNode<T>* getBranch(T* owner) = 0;
public:
	Decision(DecisionTreeNode<T>* trueNode, DecisionTreeNode<T>* falseNode)
		: trueNode(trueNode), falseNode(falseNode) { }
	virtual ~Decision() { }
	void makeDecision(T* owner) { getBranch(owner)->makeDecision(owner); }
};

#endif